<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
 <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="css/style.css"/>       
        <link href="assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
        	<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="js/jquery-1.9.1.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>           	
        <script src="assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
        <script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>
		<script src="assets/laydate/laydate.js" type="text/javascript"></script>
		<style type="text/css"> 
         #preview{width:100px;height:100px;border:1px solid #000;overflow:hidden;} 
         #imghead {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);} 
        </style> 
<title>购买积分</title>
<script type="text/javascript">  
        function previewImage(file) 
        { 
          var MAXWIDTH  = 100;  
          var MAXHEIGHT = 100; 
          var div = document.getElementById('preview'); 
          if (file.files && file.files[0]) 
          { 
              div.innerHTML ='<img id=imghead>'; 
              var img = document.getElementById('imghead'); 
              img.onload = function(){ 
                var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); 
                img.width  =  rect.width; 
                img.height =  rect.height; 
//                 img.style.marginLeft = rect.left+'px'; 
                img.style.marginTop = rect.top+'px'; 
              } 
              var reader = new FileReader(); 
              reader.onload = function(evt){img.src = evt.target.result;} 
              reader.readAsDataURL(file.files[0]); 
          } 
          else //兼容IE 
          { 
            var sFilter='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'; 
            file.select(); 
            var src = document.selection.createRange().text; 
            div.innerHTML = '<img id=imghead>'; 
            var img = document.getElementById('imghead'); 
            img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src; 
            var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); 
            status =('rect:'+rect.top+','+rect.left+','+rect.width+','+rect.height); 
            div.innerHTML = "<div id=divhead style='width:"+rect.width+"px;height:"+rect.height+"px;margin-top:"+rect.top+"px;"+sFilter+src+"\"'></div>"; 
          } 
        } 
        function clacImgZoomParam( maxWidth, maxHeight, width, height ){ 
            var param = {top:0, left:0, width:width, height:height}; 
            if( width>maxWidth || height>maxHeight ) 
            { 
                rateWidth = width / maxWidth; 
                rateHeight = height / maxHeight; 
                  
                if( rateWidth > rateHeight ) 
                { 
                    param.width =  maxWidth; 
                    param.height = Math.round(height / rateWidth); 


                }else 
                { 
                    param.width = Math.round(width / rateHeight); 
                    param.height = maxHeight; 
                } 
            } 
              
            param.left = Math.round((maxWidth - param.width) / 2); 
            param.top = Math.round((maxHeight - param.height) / 2); 
            return param; 
        } 
</script>  
</head>
<body>
<div class="margin clearfix">
 <div class="stystems_style">
  <div class="tabbable">
	<ul class="nav nav-tabs" id="myTab">
	  <li class="active">
		<a data-toggle="tab" href="#newdropdown"><i class="green fa fa-home bigger-110"></i>&nbsp;购买积分</a></li>
		<li class="">
		<a data-toggle="tab"  href="#home">&nbsp;积分兑换</a>
      </li>
	</ul>

    <div class="tab-content">
	
		<div id="home" class="tab-pane">
					<div class="type_style">
  <div class="type_content">
		<form action="" method="post" class="form form-horizontal" id="form-article-add">
			<div class=" clearfix cl">
         <label class="form-label col-2">兑换单价：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="￥0.1/积分" placeholder="" id="" name="" readonly="readonly"></div>
		</div>
		
		<div class=" clearfix cl">
         <label class="form-label col-2">拥有积分：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" readonly="readonly"value="500" placeholder="" id="" name=""></div>
		</div>
		
		<div class=" clearfix cl">
         <label class="form-label col-2">企业账户：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" readonly="readonly"value="旭派电池" placeholder="" id="" name=""></div>
		</div>
		<div class=" clearfix cl">
         <label class="form-label col-2">银行卡号：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="" placeholder="" id="" name=""></div>
		</div>
		<div class=" clearfix cl">
         <label class="form-label col-2">兑换积分：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="100" placeholder="" id="" name=""></div>
		</div>
		<div class="clearfix cl">
			<label class="form-label col-2">所得金额：</label>
			<div class="formControls col-8">
				<input type="text" class="input-text" value="￥10.00" placeholder="" id="" name=""  readonly="readonly">
			</div>
		</div>
		
		<div class="clearfix cl">
			<div class="Button_operation">
				<button onClick="article_buy();" class="btn btn-primary radius" type="submit"><i class="icon-save "></i>确认兑换</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>		
		
        </div>
</form>
 </div>
  </div>






		<div id="newdropdown" class="tab-pane active">
			<div class="type_style">
  <div class="type_content">
  <form action="" method="post" class="form form-horizontal" id="form-article-add">
  		<div class=" clearfix cl">
         <label class="form-label col-2">购买类型：</label>
		 	<div class="formControls col-8" style="margin-top:5px;">
	 		<span style="font-size:14px;">普通购买</span><input type="radio" class="input-radio" name="field＿name" onClick="aCheck1()"checked value="1" style="margin:5px;"> 
			<span style="font-size:14px;">套餐购买</span><input type="radio" class="input-radio" name="field＿name"  onclick="bCheck2()" value="2"  > 
			</div>
		</div>
	

<span id="span1" style="display:block">
	<div class=" clearfix cl">
         <label class="form-label col-2">积分单价：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="￥1.00/积分" placeholder="" id="" name="" readonly="readonly"></div>
		</div>
		
		<div class=" clearfix cl">
         <label class="form-label col-2">购买数量：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="10" placeholder="" id="" name=""></div>
		</div>
		<!--
		<div class=" clearfix cl">
         <label class="form-label col-2">支付方式：</label>
	     <div class="formControls col-8">
		 	<select class="select" >
					<option>请选择支付方式</option>
					<option value="1">支付宝</option>
					<option value="2">微信支付</option>
					<option value="3">信用卡支付</option>
					<option value="4" selected="selected">银联卡支付</option>
				</select>
		 
		 </div>
		</div>-->
			<div class=" clearfix cl">
         <label class="form-label col-2">支付方式：</label>
	     <div class="formControls col-8"><input type="text" class="input-text" value="银联卡支付" placeholder="" id="" name="" readonly="readonly"></div>
		</div>
		
		
		
		
		
		
		
		
		<div class="clearfix cl">
			<label class="form-label col-2">消费金额：</label>
			<div class="formControls col-8">
				<input type="text" class="input-text" value="￥10.00" placeholder="" id="" name=""  readonly="readonly">
			</div>
		</div>
		
		<div class="clearfix cl">
			<div class="Button_operation">
				<button onClick="article_buy();" class="btn btn-primary radius" type="submit"><i class="icon-save "></i>确认购买</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>


</span>

<span id="span2" style="display:none">

				<div class=" clearfix cl">
         <label class="form-label col-2">套餐种类：</label>
	     <div class="formControls col-8">
		 	<select class="select">
					<option>请选择套餐种类</option>
					<option value="1">A类套餐</option>
					<option value="2">B类套餐</option>
					<option value="3">C类套餐</option>
					<option value="4">D类套餐</option>
				</select>
		 
		 </div>
		</div>
		
		
		<div  style="color:red" class="clearfix cl">
         <label >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*A类套餐：优惠政策优惠政策优惠政策</label><br>
		 <label >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*B类套餐：优惠政策优惠政策优惠政策</label><br>
		 <label >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*C类套餐：优惠政策优惠政策优惠政策</label><br>
		 <label >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*D类套餐：优惠政策优惠政策优惠政策</label>
	    
		</div>
		
		
		
		
		<div class=" clearfix cl">
         <label class="form-label col-2">支付方式：</label>
	     <div class="formControls col-8">
		 	<select class="select">
					<option>请选择支付方式</option>
					<option value="1">支付宝</option>
					<option value="2">微信支付</option>
					<option value="3">信用卡支付</option>
					<option value="4">银联卡支付</option>
				</select>
		 
		 </div>
		</div>
		
		
		
		
		
		
		
		
		
		<div class="clearfix cl">
			<label class="form-label col-2">消费金额：</label>
			<div class="formControls col-8">
				<input type="text" class="input-text" value="￥10.00" placeholder="" id="" name=""  readonly="readonly">
			</div>
		</div>
		
		<div class="clearfix cl">
			<div class="Button_operation">
				<button onClick="article_buy();" class="btn btn-primary radius" type="submit"><i class="icon-save "></i>确认购买</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>





</span> 


	</form>
  </div>
</div> 
</div>
 
		</div>
 	</div>
	</div>
	</div>
	</div>

</body>
</html>
<script type="text/javascript">
function aCheck1(){

document.getElementById("span1").style.display="block";

document.getElementById("span2").style.display="none";

}

function bCheck2(){

document.getElementById("span1").style.display="none";   

document.getElementById("span2").style.display="block";

}   
// $(".widget-box").height($(window).height()-215); 
//$(".table_menu_list").width($(window).width()-260);
// $(".table_menu_list").height($(window).height()-215);
//  //当文档窗口发生改变时 触发  
//    $(window).resize(function(){
//	$(".widget-box").height($(window).height()-215);
//	 $(".table_menu_list").width($(window).width()-260);
//	  $(".table_menu_list").height($(window).height()-215);
//	})
 laydate({
    elem: '#start',
    event: 'focus' 
});
</script>